package cn.bgs.controller;

import cn.bgs.pojo.Teacher;
import cn.bgs.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/tea")
public class TeacherConreoller {

    @Autowired
    private TeacherService teacherService;


    //查询标号为1的老师所教过的全部学生
    @RequestMapping("/findById")
    @ResponseBody
    public Teacher findById(){
        Integer id = 1;

        return teacherService.findById(id);
    }

}
